﻿@model IEnumerable<FILSTARTUPS_CMS.Models.ForumGrid>
@{
    WebGrid webGrid = new WebGrid(canSort: true, canPage: true, rowsPerPage: 10, ajaxUpdateContainerId: "grid");
    webGrid.Bind(Model, autoSortAndPage: true, rowCount: Model.Count());
    
}
<div id="grid" class="append-2">
    @webGrid.GetHtml(htmlAttributes: new { id = "grid" },
alternatingRowStyle: "altrow",
mode: WebGridPagerModes.All,
    firstText: "<<first",
    previousText: "<previous",
    nextText: "next >",
    lastText: "last >>",
    columns: webGrid.Columns(
    webGrid.Column("Forum Title", "Forum Tile", format: @<b>@item.forumtitle</b>),
    webGrid.Column("Display Mode", "Display Mode", format: @<b>@item.viewtype</b>),
    webGrid.Column("Datecreated", "Datecreated", format: @<b>@item.datecreated.ToString("MMMM d, yyyy")</b>),
    webGrid.Column(header: "Action",
            style: "action",
                    format: (item) => new HtmlString(Html.ActionLink("View", "Details", new { id = item.forumidPK }) + " | " +
                    Html.ActionLink("Edit", "Edit", new { id = item.forumidPK })
            ))))
</div>
